package com.honeybee.cloud.framework.base.exception;

import lombok.Getter;

/**
 * @Description 所有 系统 exception 大类
 * @Author cheng
 * @Create 2018-12-08
 * @Since 1.0.0
 */
public enum ExceptionEnum {

    SYSTEM(10000, "系统异常"),
    SERVICE(20000, "服务异常"),
    MISSING_REQUEST_PARAMETER_EXCEPTION(30000, "参数异常"),
    HTTP_REQUEST_METHOD_NOT_SUPPORTED_EXCEPTION(40000, "请求方式异常"),
    VALIDATION_EXCEPTION(50000, "参数格式异常"),
    AUTHORIZE(60000, "权限异常"), DB(70000, "数据库异常"), BIZ(80000, "业务异常");

    @Getter
    private Integer code;
    @Getter
    private String remark;


    ExceptionEnum(Integer code, String remark) {
        this.code = code;
        this.remark = remark;
    }
}
